define(["../logic/summary","../common/common"],function(pluginClass,c){
    return {
        pluginClass:pluginClass,
        style:{
            backgroundColor:c.bodyColor,
            fontSize:13
        },
        nocache:true,
        root:["mainvlayout","personSelector"],
        components:{
          personSelector:{
            ref:true,
            title:"选择提交人",
            mes:" ",
            type:"personselector"
          },
            mainvlayout:{
                type:"vbox",
                style:{
                  height:"100%",
                  width:"100%",
                  minWidth:"900px"
                },
                items:[
                  {
                    root:["main_header"],
                    style:{
                      height:"58px"
                    }
                  },
                  {
                    root:["seach_area"],
                    style:{
                      height:"97px",
                      marginTop:"8px"
                    }
                  },
                  {
                    root:["main_body"],
                    style:{
                      paddingLeft:20,
                      paddingRight:20,
                      paddingBottom:30,
                      backgroundColor:"#fff"
                    }
                  }
                ]
            },
            mes:{
              type:"text",
              style:{
                display:"block",
                fontSize:12,
                color:"#FFB55E",
                marginTop:"8px"
              },
              text:"说明：只能查询到最新模板的数据，模板修改前的数据可以导出EXCEL，切换不同sheet进行查看",
            },
            seach_area:{
              type:"view",
              style:{
                width:"100%",
                height:"100%",
                padding:20,
                backgroundColor:"#fff"
              },
              root:["search_tem_label","seach_tem_dropdown","search_checkbox","search_timelabel","search_starttime","search_timelabel1","search_endtime","search_creator_label","range_personselector","search_btn","mes"]
            },

            range_personselector:{
              type:"view",
              className:"ds-person-selector",
              style:{
                cursor:"pointer",
                height:30,
                lineHeight:"28px",
                display:"inline-block",
                verticalAlign:"middle",
                marginLeft:"5px",
                marginRight:"5px",
                paddingRight:3,
                border:"1px solid #DDDDDD",
                borderRadius:"4px"
              },
              root:["range_title","add_range_icon"]
            },
            range_title:{
              ref:true,
              type:"text",
              style:{
                width:100,
                textIndent:"4px",
                color:"#aaa",
                whiteSpace: "nowrap",
                fontSize:"14px",
                textOverflow: "ellipsis",
                overflow: "hidden",
                display:"inline-block",
                verticalAlign:"middle"
              },
              text:"选择提交人",
            },

            add_range_icon:{
              type:"icon",
              ref:true,
              style:{
                verticalAlign:"middle",
                display:"inline-block",
              },
              iconStyle:{
                fontSize:16,
                color:"#AAAAAA"
              },
              font:"icomoon_e90b"
            },




            search_btn:{
              type:"button",
              title:"查询",
              style:{
                  color:"#0FD084",
                  borderColor:"#0FD084",
                  width:64,
                  height:30,
                  display:'inline-block',
                  verticalAlign: 'bottom',
                  float: "right"
              }
            },
            search_timelabel:{
              type:"text",
              text:"提交时间",
              style:{
                display:"inline-block",
                verticalAlign:"middle",
                fontSize:13,
                color:"#666666",
                marginRight:8
              }
            },
            search_creator_label:{
              type:"text",
              text:"提交人",
              style:{
                display:"inline-block",
                verticalAlign:"middle",
                marginLeft:20,
                color:"#666666"
              }
            },
            search_nameinput:{
                type: "autocomplete",
                displayMember: "value",
                placeholder:"全部",
                ref: true,
                autocompleteStyle: {
                    width: "118px",
                    height: "90px"
                },
                style: {
                    width: "118px",
                    marginLeft: "6px",
                    marginRight: "6px",
                    display: "inline-block",
                    verticalAlign: "middle"
                }
            },
            search_starttime:{
              type:"datepicker",
              ref:true,
              style:{
                display:"inline-block",
                verticalAlign:"middle",
                width:100
              }
            },
            search_timelabel1:{
              type:"text",
              text:"至",
              style:{
                display:"inline-block",
                verticalAlign:"middle",
                marginLeft:6,
                marginRight:6,
                color:"#666666"
              }
            },
            search_endtime:{
              type:"datepicker",
              ref:true,
              style:{
                display:"inline-block",
                verticalAlign:"middle",
                width:100
              }
            },
            search_checkbox:{
              type:"checkbox",
              className:"search_checkbox",
              text:"已停用/删除模板",
              style:{
                display:"inline-block",
                verticalAlign:"middle",
                marginRight:20,
                  marginLeft:2,
              },
              textStyle:{
                  color:"#666666",
                  fontSize:13
              }
            },
            search_tem_label:{
              type:"text",
              text:"模板",
              style:{
                display:"inline-block",
                verticalAlign:"middle",
                marginRight:6,
                color:"#666666"
              }
            },
            seach_tem_dropdown:{
              type:"dropdown",
              ref:true,
              className:"seach_tem_dropdown",
              defaultData:{id:0,title:"选择模板"},

              style:{
                display:"inline-block",
                width:130,
                verticalAlign:"middle",
                marginRight:6
              },
              dropDownStyle:{
                width:130
              },
              delayLoadData: true,
              displayMember: "title"
            },

            main_header:{
              type:"hbox",
              className:"yy-unselect",
              style:{
                background:"#fff",
                borderBottom:"1px solid #eee",
                height:"100%",
                width:"100%",
                paddingRight:"20px"
              },
              items:[
                {
                  root:["title"],
                  style:{
                    verticalAlign:"middle",
                  }
                },
                {
                  root:[],
                  style:{
                    textAlign:"right",
                    verticalAlign:"middle",
                    width:"230px"
                  }
                }
              ]
            },
            title:c.getTitle("日志汇总"),
            main_body:{
              type:"vbox",
              // className:"displaynone",
              style:{
                height:"100%",
                overflow:"hidden"
              },
              items:[{
                root:["table"],
                style:{
                  overflow:"auto",
                  bottom:100
                }
              },
              {
                root:["count_tips","bottom_btn_wrap","paginator"],
                style:{
                  verticalAlign:"middle",
                  height:"100px",
                  paddingTop:"15px",
                  lineHeight:"40px",
                }
              }]
            },
            count_tips:{
                type:"text",
                ref:true,
                className:"displaynone",
                style:{
                    fontSize:12,
                    color:"#666666",
                    lineHeight:"10px"
                },
                text:"已选中"
            },
            paginator:{
              type:"paginator",
              className:"displaynone",
              ref:true
            },
            table:{
              type:"table",
              ref:true,
              selectedMode:"m",
              nodata:"tablenodata",
              className:"dr-summary-table",
              paginator:"paginator",
              ajaxConfig:{
                url: "/diaryQuery/getDiaryStatistics",
                type: "GET",
                timeout:30000,
                pageNumKey: "pageNumber",
                pageSize: 20,
                data: {
                    pageSize: 20,
                    pageNumber: 1,
                    range: 0
                }
              },

              columns:[

              ]
            },
            tablenodata:{
                type:"icon",
                src:"./imgs/empty@3x.png",
                className:"displaynone",
                iconStyle:{
                    width:150,
                    display:"inline-block",
                    height:150
                },
                style:{
                    textAlign:"center",
                    paddingTop:"100px"
                },
                textPos:'bottom',
                textStyle:{
                    color:"#999",
                    fontSize:"14px"
                },
                text:"没有相关数据"
            },
            row_checkbox:{
              type:"checkbox",
              style:{
                display:"inline-block",
                verticalAlign:"middle"
              }
            },
            row_submittime:{
              type:"text",
              text:"09-02 12:12",
              style:{
                display:"inline-block",
                width:60,
                verticalAlign:"middle"
              },
              text_bind:"sendTime"
            },
            row_creator:{
              type:"icon",
              src_bind:"avatar",
              className:"table-row-creator",
              iconStyle:{
                  width:30,
                  height:30,
                  display:"inline-block",
                  borderRadius:"50%",
              },
              textStyle:{
                  display: "table-cell",
                  paddingLeft:"6px"
              },
              text:"创建人",
              text_bind:"userName"
            },
            bottom_btn_wrap:{
              type:"view",
              ref:true,
              className:"displaynone",
              root:["checkbox_all","excel_btn","summary_btn"]
            },
            checkbox_all:{
              type:"checkbox",
              text:"全选",
              style:{
                display:"inline-block",
                verticalAlign:"middle"
              },
              textStyle:{
                color:"#666666"
              }
            },
            summary_btn:{
              type:"button",
              title:"汇总日志",
              style:{
                float:"right",
                display:"inline-block",
                verticalAlign:"middle",
                color:"#ffffff",
                backgroundColor:"#1FDA9A",
                borderColor:"#1FDA9A",
                marginRight:"12px",
                width:110,
                height:40
              }

            },
            excel_btn:{
              type:"button",
              title:"导出EXCEL",
              style:{
                float:"right",
                display:"inline-block",
                verticalAlign:"middle",
                color:"#1FDA9A",
                backgroundColor:"#ffffff",
                borderColor:"#1FDA9A",
                width:110,
                height:40
              }
            }

        }
    };
});
